<section class="hauptseite search_advand"> 
	<div class="container"> 
		<div class="row">
			<h2>Advanced search</h2>  
			<div class="wrap_all_form search_ad">
				<?php
				if($this->params['isAjax'] == false)
				{?>
					<?php echo $form->input('category',array('onchange'=>"getSearchForm(this);",'value'=>$categoryId,'empty'=>__("-Select-"),'options'=>$categories,'label'=>false, 'class'=>'select sl_category sl_category_ad','div' => array('class'=>'w_sl_category')))?>
				<?php }?>
				<div id="adavnced_search_form">
					<?php 
						$emptyField =  $form->input("__empty",array('type'=>"hidden"));
						echo $listingSearchForm->create('Listing',array('url'=>"/".$this->params['url']['url'])); 
						echo $emptyField;
						echo $listingSearchForm->inputs($fields);
						//echo $listingSearchForm->end(__("Search"));
						echo $listingSearchForm->end(array('label'=>__('Search'), 'class'=>'bt_submit'));
					?>
				</div>
			</div>
		</div><!--/.row-->
	</div> <!--/.container-->
</section> <!-- /.hauptseite--> 

<?php if($this->params['isAjax'] == false){?>
<script type="text/javascript">
function getSearchForm(obj)
{
	$('#adavnced_search_form').html('<img src="'+AJAX_LOADING_IMG+'"/>');
	var url = "<?php echo $html->url(array('action'=>"advancedSearch"))?>";
	url += '/'+$(obj).val(); 
	$('#adavnced_search_form').load(url+" #adavnced_search_form",function(){
		
	});
}
</script>
<?php }?>